﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ADONETDataServicesExtension.Utils;

namespace ADONETDataServicesExtension
{
    public class CachedRequestParams : FrameworkEncapsulatedType<object>
    {
        internal const string FrameworkTypeName = "System.Data.Services.CachedRequestParams";

        public CachedRequestParams(object cachedRequestParams)
            : base(cachedRequestParams)
        {
        }
        public CachedRequestParams(string accept, string acceptCharset, string contentType, string httpMethod, string headerIfMatch, string headerIfNoneMatch, string version, string maxVersion, Uri absoluteRequestUri, Uri serviceUri)
        {
            FrameworkObject = ReflectionHelper.CreateInstance(FrameworkTypeName, accept, acceptCharset, contentType, httpMethod, headerIfMatch, headerIfNoneMatch, version, maxVersion, absoluteRequestUri, serviceUri);
        }

        public string Accept
        {
            get
            {
                return ReflectionHelper.GetField<string>(FrameworkTypeName, "Accept", FrameworkObject);
            }
        }

        public string AcceptCharset
        {
            get
            {
                return ReflectionHelper.GetField<string>(FrameworkTypeName, "AcceptCharset", FrameworkObject);
            }
        }

        public Uri AbsoluteRequestUri
        {
            get
            {
                return ReflectionHelper.GetField<Uri>(FrameworkTypeName, "AbsoluteRequestUri", FrameworkObject);
            }
        }
    }
}
